﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace M_ApiResult
{
    /// <summary>
    /// API返回结果
    /// </summary>
    /// <typeparam name="T">返回的数据类型</typeparam>
    public class ApiResult<T>/* where T : class,new()*/
    {
        /// <summary>
        /// 返回状态码
        /// </summary>
        public int Code { get; set; } = 0;
        /// <summary>
        /// 返回的信息
        /// </summary>
        public string Message { get; set; }

        /// <summary>
        /// 根据需要返回对应的结果数据
        /// </summary>
        public T Data { get; set; }
    }
}
